package com.monkey.util;

import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * desc:
 * auth: chenxiaobin
 * data: 2017/5/4.
 */
@Component
public class DateUtil {
    private SimpleDateFormat dateFormat;
    private SimpleDateFormat simpleDateFormat;

    public DateUtil() {
        dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    }

    public SimpleDateFormat getDateFormat() {
        return dateFormat;
    }

    public SimpleDateFormat getSimpleDateFormat() {
        return simpleDateFormat;
    }
}
